/**
 * 
 */
package slhs.tempo.scriptGenerator;

import javax.swing.JPanel;

/**
 * FeedbackOptionsPanelFactory.java
 * 
 * @author Swapnil Devikar
 * 
 */
public class FeedbackOptionsPanelFactory implements PanelFormatInterface {

    private static final FeedbackOptionsPanelFactory feedbackOptionsPanelFactory = new FeedbackOptionsPanelFactory();

    private FeedbackOptionsPanelFactory() {

    }

    public static FeedbackOptionsPanelFactory getInstance() {
	return feedbackOptionsPanelFactory;
    }

    /*
     * (non-Javadoc)
     * 
     * @see slhs.tempo.scriptGenerator.PanelFormatInterface#getPanel(java.lang.String)
     */
    @Override
    public JPanel getPanel(String feedbackType) {

	if (feedbackType.equals(UtilityConstants.WORD_FEEDBACK)) {
	    return WordFeedbackPanel.getInstance().getPanel();

	} else if (feedbackType.equals(UtilityConstants.IMAGE_FEEDBACK)) {
	    return ImageFeedbackPanel.getInstance().getPanel();

	} else if (feedbackType.equals(UtilityConstants.AUDIO_FEEDBACK)) {
	    return AudioFeedbackPanel.getInstance().getPanel();

	} else
	    return null;
    }

}
